﻿package mortal.game.net.command.buff
{
    import Framework.MQ.*;
    import Message.BroadCast.*;
    import mortal.game.cache.*;
    import mortal.game.net.broadCast.*;
    import mortal.game.scene3D.player.info.*;

    public class BuffEntityUpdateCommand extends BroadCastCall
    {

        public function BuffEntityUpdateCommand(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function call(param1:MessageBlock) : void
        {
            var _loc_5:SBuffUpdateInfo = null;
            super.call(param1);
            var _loc_2:* = param1.messageBase as SSeqBuffInfo;
            var _loc_3:* = Cache.instance.entity.getEntityInfoById(_loc_2.entityId);
            if (!_loc_3)
            {
                return;
            }
            var _loc_4:int = 0;
            while (_loc_4 < _loc_2.infos.length)
            {
                
                _loc_5 = _loc_2.infos[_loc_4] as SBuffUpdateInfo;
                _loc_3.updateBufferInfo(_loc_5.buffInfo, _loc_5.updateType);
                _loc_4++;
            }
            return;
        }// end function

    }
}
